//
//  HSHttpTool.h
//  AFNetworking
//
//  Created by huang on 2018/8/6.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM (NSInteger,HSRequestMethod){
    HSRequestMethodGET = 0,
    HSRequestMethodPOST,
    HSRequestMethodPUT,
    HSRequestMethodPATCH,
    HSRequestMethodDELETE
    
};

@interface HSHttpTool : NSObject

/**
 取消所有请求
 */
+ (void)cancelAllRequest;

/**
 网络请求

 @param method 请求方式
 @param path path
 @param params 参数
 @param success 成功回掉
 @param failure 失败回调
 */
+ (void)requestWithMethod:(HSRequestMethod)method path:(NSString *)path params:(NSDictionary *)params success:(void (^)(NSURLSessionDataTask * _Nonnull, id _Nullable))success failure:(void (^)(NSURLSessionDataTask * _Nullable, NSError * _Nonnull))failure;

@end
